package com.firewolf.service.impl;

import com.firewolf.beans.User;
import com.firewolf.dao.UserDao;
import com.firewolf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * 作者：刘兴
 * 时间:18/12/5
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User findUserByName(String userName) {
        return userDao.findUserByName(userName);
    }

    @Override
    public Set<String> findRolesByName(String userName) {
        System.out.println("从数据库中查询权限数据");
        return userDao.findRolesByName(userName);
    }

    @Override
    public Set<String> findPermissionByName(String userName) {
        return userDao.findPermissionByName(userName);
    }
}
